<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    .active {
      color: red;
    }
  </style>
</head>
<body>
<div id="app">
  <h1 class="title" :class="['active','unactive']">{{message}}</h1>
  <h1 class="title" :class="[active,unactive]">{{message}}</h1>
  <h1 class="title" :class="getClasses()">{{message}}</h1>
</div>

<script src="../js/vue.js"></script>
<script>
  //let(变量)和const(常量)
  const app = new Vue({
    el: '#app',
    data: {
      message: '中国牛蛙！',
      active: 'aaa',
      unactive: 'bbb'
    },
    methods: {
      getClasses: function () {
        return [this.active, this.unactive]
      }
    }
  })
</script>
</body>
</html>